package ${generator.packageName}.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

import org.apache.ibatis.annotations.Param;
import ${generator.packageName}.entity${(generator.childPackageName)!""}.relation.${generator.className}RelationDO;

import java.util.List;

/**
 * ${generator.tableComment} 数据层
 *
 * @author ${generator.author}
 * @version 0.0.1
 * @date ${.now?string["yyyy-MM-dd HH:mm:ss"]}
 * @since ${.now?string["yyyy-MM-dd HH:mm:ss"]}
 */
public interface ${generator.className}RelationMapper extends BaseMapper<${generator.className}RelationDO> {

    /**
     * 功能描述
     * <p>
     *    自定义连表分页
     * </p>
     *
     * @param page 分页信息
     * @param wrapper 条件查询
     * @return com.baomidou.mybatisplus.core.metadata.IPage<${generator.packageName}.entity${(generator.childPackageName)!""}.${generator.className}RelationDO>
     * @author wandoupeas
     * @date 2019-09-19 0019
     * @since 2019-09-19 0019
     */
    IPage<${generator.className}RelationDO> getRelation(Page<${generator.className}RelationDO> page, @Param(Constants.WRAPPER) Wrapper wrapper);

    /**
     * 功能描述
     * <p>
     *    自定义连表查询
     * </p>
     *
     * @param wrapper 条件查询
     * @return java.util.List<${generator.packageName}.entity${(generator.childPackageName)!""}.${generator.className}RelationDO>
     * @author wandoupeas
     * @date 2019-09-19 0019
     * @since 2019-09-19 0019
     */
    List<${generator.className}RelationDO> getRelation(@Param(Constants.WRAPPER) Wrapper wrapper);

    /**
     * 功能描述
     * <p>
     *    连表查询单条记录
     * </p>
     *
     * @param wrapper 条件查询
     * @param singleResult 查询单条记录 可随意传 true false null 都可以
     * @return ${generator.packageName}.entity${(generator.childPackageName)!""}.${generator.className}RelationDO
     * @author wandoupeas
     * @date 2019-09-19 0019
     * @since 2019-09-19 0019
     */
    ${generator.className}RelationDO getRelation(@Param(Constants.WRAPPER) Wrapper wrapper, Boolean singleResult);
}
